#统计一下每个词出现的次数
#python/是/一门/程序/设计/的/入门/课程/，/是/您/站/在/风口/上/的/必备/良药/，/是/您/站/在/风口/上/的/必备/良药/，/是/您/站/在/风口/上/的/必备/良药/，重要/的/事情/说/三遍！
'''
最后结果
result_dic = {'python':1}



'''
t = 'python/是/一门/程序/设计/的/入门/课程/，/是/您/站/在/风口/上/的/必备/良药/，/是/您/站/在/风口/上/的/必备/良药/，/是/您/站/在/风口/上/的/必备/良药/，重要/的/事情/说/三遍！'
t1_list= t.split('/')
t1_dic = {}
for i in t1_list:
    if i in t1_dic.keys():
        currentnum = t1_dic[i]
        t1_dic[i] = currentnum+1

    else:
        t1_dic[i] = 1
print(t1_dic)


favorite_languages = {
    'jen':'python',
    'sarah': 'c',
    'edward':'ruby',
    'phil':'python'

}
print(f"sarah's favorite languages is {favorite_languages['sarah'].title()}.")
favorite_place = {
    'mike':['sanya','guangzhou','shenzhen'],
    'hellen':['beijing','xian','chengdu'],
    'huby':['chongqing','zhengzhou','beijing']
}

for name,places in favorite_place.items():
    print(f"{name.title()}'s favorite places are:")
    for place in places:
        print(f'{place.title()}')
